% Chakram is a subproject of Hexena - Haskell Executable Analyser
% License:			GPL-3
% Maintainer:		Montez Fitzpatrick
% Stability:		Experimental
% Portability:		GHC
% Module:			Hexena.Data.ExportDirectory

Export Directory Format

\begin{code}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
module Hexena.Data.ExportDirectory (ExportDirectory(..)) where

import Data.Word
import Data.Label -- Needs 'fclabels'

data ExportDirectory = ExportDirectory
	{ _characteristics :: Word32
	, _timeDateStamp :: Word32
	, _majorVersion :: Word16
	, _minorVersion :: Word16
	, _name :: Word32
	, _base :: Word32
	, _numberOfFunctions :: Word32
	, _numberOfNames :: Word32
	, _addressOfFunctions :: Word32		-- RVA from base of image
	, _addressOfNames :: Word32			-- RVA from base of image
	, _addressOfNameOrdinals :: Word32	-- RVA from base of image
	} deriving (Show, Eq, Ord)

-- | Automatically derive a lens for the ExportDirectory data type, which
--   provides getters and setters for that data type.
mkLabel ''ExportDirectory

\end{code}
